package com.iraeta.entity.wx;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.iraeta.entity.type.WxMessageStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 微信文本内容发送表
 * </p>
 *
 * @author chenbin
 * @since 2024-01-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wxtextmessage")
public class Wxtextmessage implements Serializable {

    private static final long serialVersionUID = 1L;

    public Wxtextmessage(){
        this.statusId = WxMessageStatus.unSend;
    }

    public Wxtextmessage(String touser, String content) {
        this.touser = touser;
        this.content = content;
        this.statusId = WxMessageStatus.unSend;
    }

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 消息接收人  多个人用 | 分割
     */
    private String touser;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 消息状态
     */
    private Integer statusId;
    /**
     * 发送失败的异常信息
     */
    @TableField(value = "error_msg")
    private String errorMsg;

}
